package com.llynic.designdemo.proxymode.jdk;

import java.lang.reflect.Proxy;

/**
 * 经纪人对象
 */
public class ProxyObject{
    public static Object proxy(Object target){
        return Proxy.newProxyInstance(target.getClass().getClassLoader(),
                target.getClass().getInterfaces(),new MyInvocationHandler(target));
    }
}
